﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Pipes.Queries.Parser;

namespace Pipes.Queries.Tests
{
  [TestClass]
  public class PqlParseTests
  {
    private void TestParse(string query, string expected)
    {
      var parser = new PqlParser();
      //var query = "SELECT IIF(Sex='F', 'Ms. ', 'Mr. ') & LastName AS Salutation FROM tblPeople ORDER BY Sex, Salary;";
      using (var reader = new System.IO.StringReader(query))
      {
        parser.Parse(reader);
      }
      var writer = new Provider.SqlServer.SqlServerWriter();
      parser.Script.Visit(writer);
      Assert.AreEqual(expected, writer.ToString());
    }

    [TestMethod]
    public void TestMethod1()
    {
    }
  }
}
